package com.aiYouPms.common.annotations;

import com.aiYouPms.common.validator.EnumValidator;

import java.lang.annotation.*;


import jakarta.validation.Constraint;
import jakarta.validation.Payload;
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = EnumValidator.class)
@Documented
public @interface ValidEnum {
    Class<? extends Enum<?>> enumClass();
    String message() default "无效的枚举值";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
